package com.zxlspace.thread.schedule;

import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

public class TimeDemo01 {

    public static void main(String[] args) {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("定时任务。。。。");
            }
        }, new Date(System.currentTimeMillis() + 2000), 500);
    }
}
